package com.zhongwang.mms.gen.entity;

import java.util.ArrayList;
import java.util.List;

public class MMaterialDictionaryExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public MMaterialDictionaryExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andMdIdIsNull() {
            addCriterion("md_id is null");
            return (Criteria) this;
        }

        public Criteria andMdIdIsNotNull() {
            addCriterion("md_id is not null");
            return (Criteria) this;
        }

        public Criteria andMdIdEqualTo(Integer value) {
            addCriterion("md_id =", value, "mdId");
            return (Criteria) this;
        }

        public Criteria andMdIdNotEqualTo(Integer value) {
            addCriterion("md_id <>", value, "mdId");
            return (Criteria) this;
        }

        public Criteria andMdIdGreaterThan(Integer value) {
            addCriterion("md_id >", value, "mdId");
            return (Criteria) this;
        }

        public Criteria andMdIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("md_id >=", value, "mdId");
            return (Criteria) this;
        }

        public Criteria andMdIdLessThan(Integer value) {
            addCriterion("md_id <", value, "mdId");
            return (Criteria) this;
        }

        public Criteria andMdIdLessThanOrEqualTo(Integer value) {
            addCriterion("md_id <=", value, "mdId");
            return (Criteria) this;
        }

        public Criteria andMdIdIn(List<Integer> values) {
            addCriterion("md_id in", values, "mdId");
            return (Criteria) this;
        }

        public Criteria andMdIdNotIn(List<Integer> values) {
            addCriterion("md_id not in", values, "mdId");
            return (Criteria) this;
        }

        public Criteria andMdIdBetween(Integer value1, Integer value2) {
            addCriterion("md_id between", value1, value2, "mdId");
            return (Criteria) this;
        }

        public Criteria andMdIdNotBetween(Integer value1, Integer value2) {
            addCriterion("md_id not between", value1, value2, "mdId");
            return (Criteria) this;
        }

        public Criteria andMdMatCodeIsNull() {
            addCriterion("md_mat_code is null");
            return (Criteria) this;
        }

        public Criteria andMdMatCodeIsNotNull() {
            addCriterion("md_mat_code is not null");
            return (Criteria) this;
        }

        public Criteria andMdMatCodeEqualTo(String value) {
            addCriterion("md_mat_code =", value, "mdMatCode");
            return (Criteria) this;
        }

        public Criteria andMdMatCodeNotEqualTo(String value) {
            addCriterion("md_mat_code <>", value, "mdMatCode");
            return (Criteria) this;
        }

        public Criteria andMdMatCodeGreaterThan(String value) {
            addCriterion("md_mat_code >", value, "mdMatCode");
            return (Criteria) this;
        }

        public Criteria andMdMatCodeGreaterThanOrEqualTo(String value) {
            addCriterion("md_mat_code >=", value, "mdMatCode");
            return (Criteria) this;
        }

        public Criteria andMdMatCodeLessThan(String value) {
            addCriterion("md_mat_code <", value, "mdMatCode");
            return (Criteria) this;
        }

        public Criteria andMdMatCodeLessThanOrEqualTo(String value) {
            addCriterion("md_mat_code <=", value, "mdMatCode");
            return (Criteria) this;
        }

        public Criteria andMdMatCodeLike(String value) {
            addCriterion("md_mat_code like", value, "mdMatCode");
            return (Criteria) this;
        }

        public Criteria andMdMatCodeNotLike(String value) {
            addCriterion("md_mat_code not like", value, "mdMatCode");
            return (Criteria) this;
        }

        public Criteria andMdMatCodeIn(List<String> values) {
            addCriterion("md_mat_code in", values, "mdMatCode");
            return (Criteria) this;
        }

        public Criteria andMdMatCodeNotIn(List<String> values) {
            addCriterion("md_mat_code not in", values, "mdMatCode");
            return (Criteria) this;
        }

        public Criteria andMdMatCodeBetween(String value1, String value2) {
            addCriterion("md_mat_code between", value1, value2, "mdMatCode");
            return (Criteria) this;
        }

        public Criteria andMdMatCodeNotBetween(String value1, String value2) {
            addCriterion("md_mat_code not between", value1, value2, "mdMatCode");
            return (Criteria) this;
        }

        public Criteria andMdNameIsNull() {
            addCriterion("md_name is null");
            return (Criteria) this;
        }

        public Criteria andMdNameIsNotNull() {
            addCriterion("md_name is not null");
            return (Criteria) this;
        }

        public Criteria andMdNameEqualTo(String value) {
            addCriterion("md_name =", value, "mdName");
            return (Criteria) this;
        }

        public Criteria andMdNameNotEqualTo(String value) {
            addCriterion("md_name <>", value, "mdName");
            return (Criteria) this;
        }

        public Criteria andMdNameGreaterThan(String value) {
            addCriterion("md_name >", value, "mdName");
            return (Criteria) this;
        }

        public Criteria andMdNameGreaterThanOrEqualTo(String value) {
            addCriterion("md_name >=", value, "mdName");
            return (Criteria) this;
        }

        public Criteria andMdNameLessThan(String value) {
            addCriterion("md_name <", value, "mdName");
            return (Criteria) this;
        }

        public Criteria andMdNameLessThanOrEqualTo(String value) {
            addCriterion("md_name <=", value, "mdName");
            return (Criteria) this;
        }

        public Criteria andMdNameLike(String value) {
            addCriterion("md_name like", value, "mdName");
            return (Criteria) this;
        }

        public Criteria andMdNameNotLike(String value) {
            addCriterion("md_name not like", value, "mdName");
            return (Criteria) this;
        }

        public Criteria andMdNameIn(List<String> values) {
            addCriterion("md_name in", values, "mdName");
            return (Criteria) this;
        }

        public Criteria andMdNameNotIn(List<String> values) {
            addCriterion("md_name not in", values, "mdName");
            return (Criteria) this;
        }

        public Criteria andMdNameBetween(String value1, String value2) {
            addCriterion("md_name between", value1, value2, "mdName");
            return (Criteria) this;
        }

        public Criteria andMdNameNotBetween(String value1, String value2) {
            addCriterion("md_name not between", value1, value2, "mdName");
            return (Criteria) this;
        }

        public Criteria andMdPidIsNull() {
            addCriterion("md_pid is null");
            return (Criteria) this;
        }

        public Criteria andMdPidIsNotNull() {
            addCriterion("md_pid is not null");
            return (Criteria) this;
        }

        public Criteria andMdPidEqualTo(Integer value) {
            addCriterion("md_pid =", value, "mdPid");
            return (Criteria) this;
        }

        public Criteria andMdPidNotEqualTo(Integer value) {
            addCriterion("md_pid <>", value, "mdPid");
            return (Criteria) this;
        }

        public Criteria andMdPidGreaterThan(Integer value) {
            addCriterion("md_pid >", value, "mdPid");
            return (Criteria) this;
        }

        public Criteria andMdPidGreaterThanOrEqualTo(Integer value) {
            addCriterion("md_pid >=", value, "mdPid");
            return (Criteria) this;
        }

        public Criteria andMdPidLessThan(Integer value) {
            addCriterion("md_pid <", value, "mdPid");
            return (Criteria) this;
        }

        public Criteria andMdPidLessThanOrEqualTo(Integer value) {
            addCriterion("md_pid <=", value, "mdPid");
            return (Criteria) this;
        }

        public Criteria andMdPidIn(List<Integer> values) {
            addCriterion("md_pid in", values, "mdPid");
            return (Criteria) this;
        }

        public Criteria andMdPidNotIn(List<Integer> values) {
            addCriterion("md_pid not in", values, "mdPid");
            return (Criteria) this;
        }

        public Criteria andMdPidBetween(Integer value1, Integer value2) {
            addCriterion("md_pid between", value1, value2, "mdPid");
            return (Criteria) this;
        }

        public Criteria andMdPidNotBetween(Integer value1, Integer value2) {
            addCriterion("md_pid not between", value1, value2, "mdPid");
            return (Criteria) this;
        }

        public Criteria andMdStatusIsNull() {
            addCriterion("md_status is null");
            return (Criteria) this;
        }

        public Criteria andMdStatusIsNotNull() {
            addCriterion("md_status is not null");
            return (Criteria) this;
        }

        public Criteria andMdStatusEqualTo(Integer value) {
            addCriterion("md_status =", value, "mdStatus");
            return (Criteria) this;
        }

        public Criteria andMdStatusNotEqualTo(Integer value) {
            addCriterion("md_status <>", value, "mdStatus");
            return (Criteria) this;
        }

        public Criteria andMdStatusGreaterThan(Integer value) {
            addCriterion("md_status >", value, "mdStatus");
            return (Criteria) this;
        }

        public Criteria andMdStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("md_status >=", value, "mdStatus");
            return (Criteria) this;
        }

        public Criteria andMdStatusLessThan(Integer value) {
            addCriterion("md_status <", value, "mdStatus");
            return (Criteria) this;
        }

        public Criteria andMdStatusLessThanOrEqualTo(Integer value) {
            addCriterion("md_status <=", value, "mdStatus");
            return (Criteria) this;
        }

        public Criteria andMdStatusIn(List<Integer> values) {
            addCriterion("md_status in", values, "mdStatus");
            return (Criteria) this;
        }

        public Criteria andMdStatusNotIn(List<Integer> values) {
            addCriterion("md_status not in", values, "mdStatus");
            return (Criteria) this;
        }

        public Criteria andMdStatusBetween(Integer value1, Integer value2) {
            addCriterion("md_status between", value1, value2, "mdStatus");
            return (Criteria) this;
        }

        public Criteria andMdStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("md_status not between", value1, value2, "mdStatus");
            return (Criteria) this;
        }

        public Criteria andMdTypeNumIsNull() {
            addCriterion("md_type_num is null");
            return (Criteria) this;
        }

        public Criteria andMdTypeNumIsNotNull() {
            addCriterion("md_type_num is not null");
            return (Criteria) this;
        }

        public Criteria andMdTypeNumEqualTo(Integer value) {
            addCriterion("md_type_num =", value, "mdTypeNum");
            return (Criteria) this;
        }

        public Criteria andMdTypeNumNotEqualTo(Integer value) {
            addCriterion("md_type_num <>", value, "mdTypeNum");
            return (Criteria) this;
        }

        public Criteria andMdTypeNumGreaterThan(Integer value) {
            addCriterion("md_type_num >", value, "mdTypeNum");
            return (Criteria) this;
        }

        public Criteria andMdTypeNumGreaterThanOrEqualTo(Integer value) {
            addCriterion("md_type_num >=", value, "mdTypeNum");
            return (Criteria) this;
        }

        public Criteria andMdTypeNumLessThan(Integer value) {
            addCriterion("md_type_num <", value, "mdTypeNum");
            return (Criteria) this;
        }

        public Criteria andMdTypeNumLessThanOrEqualTo(Integer value) {
            addCriterion("md_type_num <=", value, "mdTypeNum");
            return (Criteria) this;
        }

        public Criteria andMdTypeNumIn(List<Integer> values) {
            addCriterion("md_type_num in", values, "mdTypeNum");
            return (Criteria) this;
        }

        public Criteria andMdTypeNumNotIn(List<Integer> values) {
            addCriterion("md_type_num not in", values, "mdTypeNum");
            return (Criteria) this;
        }

        public Criteria andMdTypeNumBetween(Integer value1, Integer value2) {
            addCriterion("md_type_num between", value1, value2, "mdTypeNum");
            return (Criteria) this;
        }

        public Criteria andMdTypeNumNotBetween(Integer value1, Integer value2) {
            addCriterion("md_type_num not between", value1, value2, "mdTypeNum");
            return (Criteria) this;
        }

        public Criteria andMdFormulaTypeIsNull() {
            addCriterion("md_formula_type is null");
            return (Criteria) this;
        }

        public Criteria andMdFormulaTypeIsNotNull() {
            addCriterion("md_formula_type is not null");
            return (Criteria) this;
        }

        public Criteria andMdFormulaTypeEqualTo(Integer value) {
            addCriterion("md_formula_type =", value, "mdFormulaType");
            return (Criteria) this;
        }

        public Criteria andMdFormulaTypeNotEqualTo(Integer value) {
            addCriterion("md_formula_type <>", value, "mdFormulaType");
            return (Criteria) this;
        }

        public Criteria andMdFormulaTypeGreaterThan(Integer value) {
            addCriterion("md_formula_type >", value, "mdFormulaType");
            return (Criteria) this;
        }

        public Criteria andMdFormulaTypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("md_formula_type >=", value, "mdFormulaType");
            return (Criteria) this;
        }

        public Criteria andMdFormulaTypeLessThan(Integer value) {
            addCriterion("md_formula_type <", value, "mdFormulaType");
            return (Criteria) this;
        }

        public Criteria andMdFormulaTypeLessThanOrEqualTo(Integer value) {
            addCriterion("md_formula_type <=", value, "mdFormulaType");
            return (Criteria) this;
        }

        public Criteria andMdFormulaTypeIn(List<Integer> values) {
            addCriterion("md_formula_type in", values, "mdFormulaType");
            return (Criteria) this;
        }

        public Criteria andMdFormulaTypeNotIn(List<Integer> values) {
            addCriterion("md_formula_type not in", values, "mdFormulaType");
            return (Criteria) this;
        }

        public Criteria andMdFormulaTypeBetween(Integer value1, Integer value2) {
            addCriterion("md_formula_type between", value1, value2, "mdFormulaType");
            return (Criteria) this;
        }

        public Criteria andMdFormulaTypeNotBetween(Integer value1, Integer value2) {
            addCriterion("md_formula_type not between", value1, value2, "mdFormulaType");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}